package Demo1;
// 定义一个Book类
public class Book {
    //定义属性
    private int ID;
    private String name;
    private String actor;


    // getter和setter方法
    public int getID() {
        return ID;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getActor() {
        return actor;
    }

    public void setActor(String actor) {
        this.actor = actor;
    }



    //定义无参构造方法
    public Book() {
    }

    //定义有参构造方法
    public Book(int ID, String name, String actor)
    {
        this.ID = ID;
        this.name = name;
        this.actor = actor;
    }
}
